package com.bys.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class HelloController {
    public static final String service_url ="http://edu-alibaba-nacos-provider";
    @Resource
    private RestTemplate restTemplate;
    @GetMapping("/consumer/hello")
    public String hello(){
        return  restTemplate.getForObject(service_url+"/hello",String.class);
    }
}
